// =============================================================================
// Copyright 2012 NCR Corporation
// =============================================================================
// All revision information is updated automatically from source code control
// change records - please do not manually edit.
// =============================================================================
//
// =============================================================================
//  $LastChangedRevision::                                          $
//  $LastChangedBy::                                                $
//  $LastChangedDate::                                              $
// =============================================================================

.fluid-grid {

    // Setup the mixins to be used
    .columns(@fluid-grid-gutter-width, @fluid-grid-column-width, @columns) {
        width: 1% * (@fluid-grid-column-width * @columns) + (@fluid-grid-gutter-width * (@columns - 1));
    }

    .gridColumn(@fluid-grid-gutter-width) {
        float: left;
        margin-left: @fluid-grid-gutter-width;
    }

    // Take these values and mixins, and make 'em do their thang
    .generate(@grid-columns, @fluid-grid-column-width, @fluid-grid-gutter-width) {
        // Row surrounds the columns
        .row-fluid {
            width: 100%;
            .mixins > .clear();

            // Find all .span# classes within .row and give them the
            // necessary properties for grid columns (supported by all
            // browsers back to IE7, thanks @dhg)
            > [class*="span"] {
                .fluid-grid > .gridColumn(@fluid-grid-gutter-width);
            }
            > [class*="span"]:first-child {
                margin-left: 0;
            }

            // Default columns
            > .span1     { .fluid-grid > .columns(@fluid-grid-gutter-width, @fluid-grid-column-width, 1); }
            > .span2     { .fluid-grid > .columns(@fluid-grid-gutter-width, @fluid-grid-column-width, 2); }
            > .span3     { .fluid-grid > .columns(@fluid-grid-gutter-width, @fluid-grid-column-width, 3); }
            > .span4     { .fluid-grid > .columns(@fluid-grid-gutter-width, @fluid-grid-column-width, 4); }
            > .span5     { .fluid-grid > .columns(@fluid-grid-gutter-width, @fluid-grid-column-width, 5); }
            > .span6     { .fluid-grid > .columns(@fluid-grid-gutter-width, @fluid-grid-column-width, 6); }
            > .span7     { .fluid-grid > .columns(@fluid-grid-gutter-width, @fluid-grid-column-width, 7); }
            > .span8     { .fluid-grid > .columns(@fluid-grid-gutter-width, @fluid-grid-column-width, 8); }
            > .span9     { .fluid-grid > .columns(@fluid-grid-gutter-width, @fluid-grid-column-width, 9); }
            > .span10    { .fluid-grid > .columns(@fluid-grid-gutter-width, @fluid-grid-column-width, 10); }
            > .span11    { .fluid-grid > .columns(@fluid-grid-gutter-width, @fluid-grid-column-width, 11); }
            > .span12    { .fluid-grid > .columns(@fluid-grid-gutter-width, @fluid-grid-column-width, 12); }
        }
    }
}

.fluid-grid > .generate(@grid-columns, @fluid-grid-column-width, @fluid-grid-gutter-width);